﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
    CodeFile="AUVDGroups.aspx.cs" Inherits="AUVDGroups" Title="Groups" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <title>Work Organizer - List Groups</title>

    <script language="javascript" type="text/javascript">
        function Clickheretoprint() {
            var disp_setting = "toolbar=yes,location=no,directories=yes,menubar=no,";
            disp_setting += "scrollbars=yes,width=650, height=600, left=100, top=25";
            var content_vlue = document.getElementById("print_content").innerHTML;

            var docprint = window.open("", "", disp_setting);
            docprint.document.open();

            docprint.document.write('<html><head><title></title>');
            docprint.document.write('</head><body onLoad="self.print()"><center>');
            docprint.document.write(content_vlue);
            docprint.document.write('</center></body></html>');
            docprint.document.close();
            docprint.focus();
        }
    </script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <table>
        <tr>
            <td width="300" align="center">
                <asp:Label runat="server" Font-Bold="True" Font-Size="Medium" ForeColor="Maroon">All groups</asp:Label>
            </td>
            <td width="300" align="center">
                &nbsp;
            </td>
            <td width="300" align="center">
                <asp:LinkButton ID="lnkBtnAddNewGroup" runat="server" PostBackUrl="~/AddGroup.aspx">Add New group</asp:LinkButton>
            </td>
        </tr>
        <tr>
            <td colspan="3" align="center">
                <asp:DataGrid ID="Grid" runat="server" PageSize="5" DataKeyField="UserTypeId" AutoGenerateColumns="False"
                    CellPadding="4" ForeColor="#333333" GridLines="None" OnCancelCommand="Grid_CancelCommand"
                    OnDeleteCommand="Grid_DeleteCommand" OnEditCommand="Grid_EditCommand" OnUpdateCommand="Grid_UpdateCommand"
                    Width="80%" AllowSorting="true">
                    <Columns>
                        <asp:BoundColumn HeaderText="Id" DataField="UserTypeId" ReadOnly="true"></asp:BoundColumn>
                        <asp:BoundColumn HeaderText="User Group" DataField="UserType"></asp:BoundColumn>
                        <asp:BoundColumn HeaderText="Parent" DataField="Parent" ReadOnly="true"></asp:BoundColumn>
                        <asp:BoundColumn HeaderText="Created Date" DataField="CreatedDate" ReadOnly="true">
                        </asp:BoundColumn>
                        <asp:EditCommandColumn EditText="Edit" CancelText="Cancel" UpdateText="Update" HeaderText="Edit">
                        </asp:EditCommandColumn>
                        <asp:ButtonColumn CommandName="Delete" HeaderText="Delete" Text="Delete"></asp:ButtonColumn>
                    </Columns>
                    <%--<FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />--%>
                    <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                    <EditItemStyle BackColor="#999999" />
                    <SelectedItemStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                    <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                    <AlternatingItemStyle BackColor="White" ForeColor="#284775" />
                    <ItemStyle BackColor="#F7F6F3" ForeColor="#333333" />
                    <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                </asp:DataGrid>
            </td>
        </tr>
        <tr>
            <td width="300" align="center">
                <asp:Label ID="Label1" runat="server" Font-Bold="True" Font-Size="Medium" ForeColor="Maroon">All Users</asp:Label>
            </td>
            <td width="300" align="center">
                &nbsp;
            </td>
            <td width="300" align="center">
                <asp:LinkButton ID="LinkButton2" runat="server" PostBackUrl="~/Register.aspx">Add New user</asp:LinkButton>
            </td>
        </tr>
        <tr>
            <td colspan="3" align="center">
                <asp:DataGrid ID="UserGrid" runat="server" PageSize="5" DataKeyField="UserId" AutoGenerateColumns="False"
                    CellPadding="4" ForeColor="#333333" GridLines="None" OnCancelCommand="UserGrid_CancelCommand"
                    OnDeleteCommand="UserGrid_DeleteCommand" OnEditCommand="UserGrid_EditCommand"
                    OnUpdateCommand="UserGrid_UpdateCommand" Width="80%" AllowSorting="true">
                    <Columns>
                        <asp:BoundColumn HeaderText="Id" DataField="UserId" ReadOnly="true"></asp:BoundColumn>
                        <asp:BoundColumn HeaderText="Login Name" DataField="LoginName" ReadOnly="true"></asp:BoundColumn>
                        <asp:BoundColumn HeaderText="Email Id" DataField="EmailId"></asp:BoundColumn>
                        <asp:BoundColumn HeaderText="Mobile Number" DataField="MobileNumber"></asp:BoundColumn>
                        <asp:BoundColumn HeaderText="User Group" DataField="UserType" ReadOnly="true"></asp:BoundColumn>
                        <asp:BoundColumn HeaderText="Created Date" DataField="CreatedDate" ReadOnly="true">
                        </asp:BoundColumn>
                        <asp:EditCommandColumn EditText="Edit" CancelText="Cancel" UpdateText="Update" HeaderText="Edit">
                        </asp:EditCommandColumn>
                        <asp:ButtonColumn CommandName="Delete" HeaderText="Delete" Text="Delete"></asp:ButtonColumn>
                    </Columns>
                    <%--<FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />--%>
                    <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                    <EditItemStyle BackColor="#999999" />
                    <SelectedItemStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                    <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                    <AlternatingItemStyle BackColor="White" ForeColor="#284775" />
                    <ItemStyle BackColor="#F7F6F3" ForeColor="#333333" />
                    <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                </asp:DataGrid>
            </td>
        </tr>
    </table>
</asp:Content>
